package com.eims.app.biz;
 

import java.io.IOException;

import org.apache.http.client.ClientProtocolException;

import android.content.Context;
import android.os.Environment;
import android.util.Log;

import com.eims.app.configs.Urls;
import com.eims.app.https.HttpUtils;

public class UploadDao extends BaseDao {
	private Context mContext;

	public UploadDao(Context context) {
		mContext = context;
	}

	public String upload() throws ClientProtocolException, IOException {
		String url = Urls.UPLOAD_URL;
		String filePath = Environment.getExternalStorageDirectory()
				+ "/mypic.jpg";
		Log.e("HTTP", filePath);
		String  result = HttpUtils.uploadByHttpClient(mContext, url, filePath);
		return result;
	}
}
